import { ref, reactive } from 'vue';
import type { SeachData } from '@/api/project/project.d';

export default function useSearch() {

    const searchRefForm = ref();

    const searchForm: SeachData = reactive({
        department: undefined,        //科室
        keyword: undefined,            //项目ID、名称、创建人
        status: undefined, // 任务状态
        uses: undefined,    //项目用途
        companyId: undefined, // 标注单位id
        label: undefined,       // 项目标签
        target: undefined,    // 项目目标
        annoUserId: undefined, // 标注医生id
        beginDate: undefined, // 起始时间
        endDate: undefined, // 结束时间
        ids: [], // 任务ID集合
        page: 1,
        pageSize: 10,
    });

    return {
        searchRefForm,
        searchForm
    };
};